using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VWASTKE
    {
        public void SetUpNewRow(ref DataRow dwReturn)
        {

            switch (app.company)
            {
                case "YGR":
                case "TST":
                case "UBT":
                default:
                    #region=========
                    dwReturn["WAKMANDANT"] = "00";
                    dwReturn["WAKKUNDNR"] = "00000000";
                    dwReturn["WAKWERK"] = "   ";
                    dwReturn["WAKABT"] = "   ";
                    dwReturn["WAKART"] = "1234                ";
                    dwReturn["WAKVAR"] = "  ";
                    dwReturn["WAKWCOL"] = "1         ";
                    dwReturn["WAKPOS"] = "01";
                    dwReturn["WAKKART"] = "32598               ";
                    dwReturn["WAKKVAR"] = "1 ";
                    dwReturn["WAKKFARBE"] = "          ";
                    dwReturn["WAKBAUMKZ"] = "Z";
                    dwReturn["WAKVERWEN"] = "2";
                    dwReturn["WAKANZBA"] = "01";
                    dwReturn["WAKDIVISOR"] = "01";
                    dwReturn["WAKEAFAKTM"] = "0";
                    dwReturn["WAKEAFAKTR"] = "12000";
                    dwReturn["WAKDISPOKZ"] = "B";
                    dwReturn["WAKSTBR"] = "D";
                    dwReturn["WAKLLEIST"] = "    ";
                    dwReturn["WAKRLEIST"] = "    ";
                    dwReturn["WAKRBEM"] = "                 ";
                    dwReturn["WAKNET"] = "120000";
                    dwReturn["WAKBRUT"] = "120000";
                    dwReturn["WAKROSTA"] = "N";
                    dwReturn["WAKSBSTUE"] = "V";
                    dwReturn["WAKEARUE"] = "0";
                    dwReturn["WAKSTICH"] = "0";
                    dwReturn["WAKSCHIEART"] = " ";
                    dwReturn["WAKSCHIENE"] = "     ";
                    dwReturn["WAKLAENG"] = "0";
                    dwReturn["WAKEINL"] = "0";
                    dwReturn["WAKSPANNV"] = "0";
                    dwReturn["WAKSPANNB"] = "0";
                    dwReturn["WAKSPANNF"] = "00";
                    dwReturn["WAKVERSATZ"] = "0";
                    dwReturn["WAKVARKZ"] = " ";
                    dwReturn["WAKABFFDZ"] = "0";
                    dwReturn["WAKUSEDFDZ"] = "0";
                    dwReturn["WAKFILLER"] = "                      ";
                    dwReturn["WAKAENZL"] = "0";
                    dwReturn["WAKAENB"] = "        ";
                    dwReturn["WAKAEND"] = "0";
                    dwReturn["WAKNEUB"] = "        ";
                    dwReturn["WAKNEUD"] = "0";

                    #endregion
                    break;
                case "JLT":

                    break;
            }
        }
        public void MapWASTKE(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveWASTKE(DataRow dwData, DataRow dwDispo)
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryWASTKE(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }

            MapWASTKE(ref dwLocal, dwData);

            if (!flgExist)
            {
                InsertWASTKE(dwLocal);
            }
            UpdateWASTKE(dwLocal);
        }
        public void InsertWASTKE(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            dwData["WAKNEUB"] = app.User;
            dwData["WAKNEUD"] = date;
            or1 = OracleDB.CreateCommand();
            switch (app.company)
            {
                case "YGR":
                case "TST":
                case "UBT":
                default:
                    or1.CommandText = "INSERT INTO WASTKE ( WAKMANDANT,WAKKUNDNR,WAKWERK,WAKABT,WAKART,WAKVAR,WAKWCOL,WAKPOS,WAKKART,WAKKVAR,WAKKFARBE,WAKBAUMKZ,WAKVERWEN,WAKANZBA,WAKDIVISOR,WAKEAFAKTM,WAKEAFAKTR,WAKDISPOKZ,WAKSTBR,WAKLLEIST,WAKRLEIST,WAKRBEM,WAKNET,WAKBRUT,WAKROSTA,WAKSBSTUE,WAKEARUE,WAKSTICH,WAKSCHIEART,WAKSCHIENE,WAKLAENG,WAKEINL,WAKSPANNV,WAKSPANNB,WAKSPANNF,WAKVERSATZ,WAKVARKZ,WAKABFFDZ,WAKUSEDFDZ,WAKFILLER,WAKAENZL,WAKAENB,WAKAEND,WAKNEUB,WAKNEUD)"
                        + " VALUES (:WAKMANDANT:,:WAKKUNDNR:,:WAKWERK:,:WAKABT:,:WAKART:,:WAKVAR:,:WAKWCOL:,:WAKPOS:,:WAKKART:,:WAKKVAR:,:WAKKFARBE:,:WAKBAUMKZ:,:WAKVERWEN:,:WAKANZBA:,:WAKDIVISOR:,:WAKEAFAKTM:,:WAKEAFAKTR:,:WAKDISPOKZ:,:WAKSTBR:,:WAKLLEIST:,:WAKRLEIST:,:WAKRBEM:,:WAKNET:,:WAKBRUT:,:WAKROSTA:,:WAKSBSTUE:,:WAKEARUE:,:WAKSTICH:,:WAKSCHIEART:,:WAKSCHIENE:,:WAKLAENG:,:WAKEINL:,:WAKSPANNV:,:WAKSPANNB:,:WAKSPANNF:,:WAKVERSATZ:,:WAKVARKZ:,:WAKABFFDZ:,:WAKUSEDFDZ:,:WAKFILLER:,:WAKAENZL:,:WAKAENB:,:WAKAEND:,:WAKNEUB:,:WAKNEUD:)";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    break;
                case "JLT":
                    or1.CommandText = "INSERT INTO WASTKE(WAKMANDANT, WAKKUNDNR, WAKWERK, WAKABT, WAKART, WAKVAR, WAKWCOL, WAKPOS, WAKKART, WAKKVAR, WAKKFARBE, WAKBAUMKZ, WAKVERWEN, WAKANZBA, WAKDIVISOR, WAKEAFAKTM, WAKEAFAKTR, WAKDISPOKZ, WAKSTBR, WAKLLEIST, WAKRLEIST, WAKRBEM, WAKNET, WAKBRUT, WAKROSTA, WAKSBSTUE, WAKEARUE, WAKSTICH, WAKSCHIEART, WAKSCHIENE, WAKLAENG, WAKEINL, WAKSPANNV, WAKSPANNB, WAKSPANNF, WAKVERSATZ, WAKVARKZ, WAKABFFDZ, WAKUSEDFDZ, WAKFILLER, WAKAENZL, WAKAENB, WAKAEND, WAKNEUB, WAKNEUD)"
                        + " VALUES (:WAKMANDANT, '00000000', '   ', '   ', :WAKART, :WAKVAR, :WAKWCOL, :WAKPOS, '                    ', '  ', '          ', 'Z', 'S', '01', '01', 0, 0, 'B', 'D', '    ', '    ', '                 ', 0, 0, 'N', 'V', 0, 0, ' ', '     ', 0, 0, 0, 0, '00', 0, ' ', 0, 0, '                      ', 0, '        ', 0, '        ', 0)";
                    or1.Parameters.Add("WAKMANDANT", OracleType.NVarChar).Value = dwData["WAKMANDANT"].ToString();
                    or1.Parameters.Add("WAKART", OracleType.NVarChar).Value = dwData["WAKART"].ToString();
                    or1.Parameters.Add("WAKVAR", OracleType.NVarChar).Value = dwData["WAKVAR"].ToString();
                    or1.Parameters.Add("WAKWCOL", OracleType.NVarChar).Value = dwData["WAKWCOL"].ToString();
                    or1.Parameters.Add("WAKPOS", OracleType.NVarChar).Value = dwData["WAKPOS"].ToString();
                    break;
            }
            Connect2Proxy(or1);
        }
        public override string BATCHINSERT(DataRow dwData)
        {
           
            string value = "";
            switch (app.company)
            {
                default:
                case "SXN":
                case "YGR":
                case "TST":
                    value = "INTO WASTAMM  "
                        + " VALUES (:WAKMANDANT:,:WAKKUNDNR:,:WAKWERK:,:WAKABT:,:WAKART:,:WAKVAR:,:WAKWCOL:,:WAKPOS:,:WAKKART:,:WAKKVAR:,:WAKKFARBE:,:WAKBAUMKZ:,:WAKVERWEN:,:WAKANZBA:,:WAKDIVISOR:,:WAKEAFAKTM:,:WAKEAFAKTR:,:WAKDISPOKZ:,:WAKSTBR:,:WAKLLEIST:,:WAKRLEIST:,:WAKRBEM:,:WAKNET:,:WAKBRUT:,:WAKROSTA:,:WAKSBSTUE:,:WAKEARUE:,:WAKSTICH:,:WAKSCHIEART:,:WAKSCHIENE:,:WAKLAENG:,:WAKEINL:,:WAKSPANNV:,:WAKSPANNB:,:WAKSPANNF:,:WAKVERSATZ:,:WAKVARKZ:,:WAKABFFDZ:,:WAKUSEDFDZ:,:WAKFILLER:,:WAKAENZL:,:WAKAENB:,:WAKAEND:,:WAKNEUB:,:WAKNEUD:)";
                    value = INTEXDBC.InjectData(value, dwData);
                    break;
            }
            return value;
        }
        public void DeleteWASTKE(string client, string art, string var, string color)
        { 
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE WASTKE"
           + " WHERE WAKMANDANT=:WAKMANDANT AND WAKART=:WAKART AND WAKVAR=:WAKVAR AND WAKWCOL=:WAKWCOL";
            or1.Parameters.Add("WAKMANDANT", OracleType.NVarChar).Value = client;
            or1.Parameters.Add("WAKART", OracleType.NVarChar).Value = art;
            or1.Parameters.Add("WAKVAR", OracleType.NVarChar).Value = var;
            or1.Parameters.Add("WAKWCOL", OracleType.NVarChar).Value = color;
            Connect2Proxy(or1);
        }
        public void DWAK01(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE WASTKE"
           + " WHERE WAKMANDANT=:WAKMANDANT: AND WAKART=:WAKART: AND WAKVAR=:WAKVAR: AND WAKWCOL=:WAKWCOL:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);  
        }
        public DataSet QueryWASTKE(DataRow dwData, int option = 1)
        {
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM WASTKE WHERE  ROWNUM<2 ";
                    break;
                case 1:
                    or1.CommandText = "SELECT * FROM WASTKE"
                   + " WHERE WAKMANDANT=:WAKMANDANT AND WAKART=:WAKART AND WAKVAR=:WAKVAR AND WAKWCOL=:WAKWCOL";
                    or1.Parameters.Add("WAKMANDANT", OracleType.NVarChar).Value = dwData["WAKMANDANT"].ToString();
                    or1.Parameters.Add("WAKART", OracleType.NVarChar).Value = dwData["WAKART"].ToString();
                    or1.Parameters.Add("WAKVAR", OracleType.NVarChar).Value = dwData["WAKVAR"].ToString();
                    or1.Parameters.Add("WAKWCOL", OracleType.NVarChar).Value = dwData["WAKWCOL"].ToString();
                    break;
                case 2:
                    or1.CommandText = "SELECT DISTINCT WDAUFKRS,WDAUFLFD,WDAUFPOS, K.* FROM WDECK  WD "
                        + " JOIN WASTAMM W ON WDART=W.WAART AND WDVAR=W.WAVAR"
                        + " JOIN WASTKE K ON WAART=WAKART AND WAVAR=WAKVAR AND WAKWCOL=WDFARBE"
                        + " WHERE WDMANDANT=:WDMANDANT AND WDSA='K' AND WDTYP='B' AND WDWAKZ='F' AND WDAUFKRS=:WDAUFKRS  AND WDAUFLFD=:WDAUFLFD";
                    or1.Parameters.Add("WDMANDANT", OracleType.NVarChar).Value = dwData["WDMANDANT"].ToString();
                    or1.Parameters.Add("WDAUFKRS", OracleType.NVarChar).Value = dwData["WDAUFKRS"].ToString();
                    or1.Parameters.Add("WDAUFLFD", OracleType.NVarChar).Value = dwData["WDAUFLFD"].ToString();
                    break;
            }

            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = "WASTKE";
            return SResult;
        }
        public DataSet QWAK00(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand(); 
            or1.CommandText = "SELECT * FROM WASTKE WHERE  ROWNUM<2 ";  
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = "WASTKE";
            return SResult;
        }
        public DataSet QWAK01(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();

            or1.CommandText = "SELECT * FROM WASTKE"
           + " WHERE WAKMANDANT=:WAKMANDANT: AND WAKART=:WAKART: AND WAKVAR=:WAKVAR: AND WAKWCOL=:WAKWCOL:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QWAK02(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();

            or1.CommandText = "SELECT DISTINCT WDAUFKRS,WDAUFLFD,WDAUFPOS, K.* FROM WDECK  WD "
                + " JOIN WASTAMM W ON WDART=W.WAART AND WDVAR=W.WAVAR"
                + " JOIN WASTKE K ON WAART=WAKART AND WAVAR=WAKVAR AND WAKWCOL=WDFARBE"
                + " WHERE WDMANDANT=:WDMANDANT: AND WDSA='K' AND WDTYP='B' AND WDWAKZ='F' AND WDAUFKRS=:WDAUFKRS:  AND WDAUFLFD=:WDAUFLFD:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QWAK03(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();

            or1.CommandText = "SELECT * FROM WASTKE"
           + " WHERE WAKMANDANT=:WAKMANDANT: AND WAKART=:WAKART: AND WAKVAR=:WAKVAR: ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public void UpdateWASTKE(DataRow dwData, int option = 1)
        {

            if (option == 0)
            {
                switch (app.company)
                {
                    case "JLT":
                        UWAK01(dwData);
                        break;
                    case "YGR":
                    case "TST":
                    case "UBT":
                    default:
                        UWAK02(dwData);
                        break;
                }
            }
        }
        public void UWAK01(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE WASTKE SET "
                + "WAKMANDANT=:WAKMANDANT,"
                + "WAKKUNDNR=:WAKKUNDNR,"
                + "WAKWERK=:WAKWERK,"
                + "WAKABT=:WAKABT,"
                + "WAKART=:WAKART,"
                + "WAKVAR=:WAKVAR,"
                + "WAKWCOL=:WAKWCOL,"
                + "WAKPOS=:WAKPOS,"
                + "WAKKART=:WAKKART,"
                + "WAKKVAR=:WAKKVAR,"
                + "WAKKFARBE=:WAKKFARBE,"
                + "WAKBAUMKZ=:WAKBAUMKZ,"
                + "WAKVERWEN=:WAKVERWEN,"
                + "WAKANZBA=:WAKANZBA,"
                + "WAKDIVISOR=:WAKDIVISOR,"
                + "WAKEAFAKTM=:WAKEAFAKTM,"
                + "WAKEAFAKTR=:WAKEAFAKTR,"
                + "WAKDISPOKZ=:WAKDISPOKZ,"
                + "WAKSTBR=:WAKSTBR,"
                + "WAKLLEIST=:WAKLLEIST,"
                + "WAKRLEIST=:WAKRLEIST,"
                + "WAKRBEM=:WAKRBEM,"
                + "WAKNET=:WAKNET,"
                + "WAKBRUT=:WAKBRUT,"
                + "WAKROSTA=:WAKROSTA,"
                + "WAKSBSTUE=:WAKSBSTUE,"
                + "WAKEARUE=:WAKEARUE,"
                + "WAKSTICH=:WAKSTICH,"
                + "WAKSCHIEART=:WAKSCHIEART,"
                + "WAKSCHIENE=:WAKSCHIENE,"
                + "WAKLAENG=:WAKLAENG,"
                + "WAKEINL=:WAKEINL,"
                + "WAKSPANNV=:WAKSPANNV,"
                + "WAKSPANNB=:WAKSPANNB,"
                + "WAKSPANNF=:WAKSPANNF,"
                + "WAKVERSATZ=:WAKVERSATZ,"
                + "WAKVARKZ=:WAKVARKZ,"
                + "WAKABFFDZ=:WAKABFFDZ,"
                + "WAKUSEDFDZ=:WAKUSEDFDZ,"
                + "WAKFILLER=:WAKFILLER,"
                + "WAKAENZL=:WAKAENZL,"
                + "WAKAENB=:WAKAENB,"
                + "WAKAEND=:WAKAEND,"
                + "WAKNEUB=:WAKNEUB,"
                + "WAKNEUD=:WAKNEUD "
                + " WHERE    WAKMANDANT=:WAKMANDANT AND WAKART=:WAKART  AND WAKVAR=:WAKVAR  AND WAKWCOL=:WAKWCOL";
            or1.Parameters.Add("WAKMANDANT", OracleType.NVarChar).Value = dwData["WAKMANDANT"].ToString();
            or1.Parameters.Add("WAKKUNDNR", OracleType.NVarChar).Value = dwData["WAKKUNDNR"].ToString();
            or1.Parameters.Add("WAKWERK", OracleType.NVarChar).Value = dwData["WAKWERK"].ToString();
            or1.Parameters.Add("WAKABT", OracleType.NVarChar).Value = dwData["WAKABT"].ToString();
            or1.Parameters.Add("WAKART", OracleType.NVarChar).Value = dwData["WAKART"].ToString();
            or1.Parameters.Add("WAKVAR", OracleType.NVarChar).Value = dwData["WAKVAR"].ToString();
            or1.Parameters.Add("WAKWCOL", OracleType.NVarChar).Value = dwData["WAKWCOL"].ToString();
            or1.Parameters.Add("WAKPOS", OracleType.NVarChar).Value = dwData["WAKPOS"].ToString();
            or1.Parameters.Add("WAKKART", OracleType.NVarChar).Value = dwData["WAKKART"].ToString();
            or1.Parameters.Add("WAKKVAR", OracleType.NVarChar).Value = dwData["WAKKVAR"].ToString();
            or1.Parameters.Add("WAKKFARBE", OracleType.NVarChar).Value = dwData["WAKKFARBE"].ToString();
            or1.Parameters.Add("WAKBAUMKZ", OracleType.NVarChar).Value = dwData["WAKBAUMKZ"].ToString();
            or1.Parameters.Add("WAKVERWEN", OracleType.NVarChar).Value = dwData["WAKVERWEN"].ToString();
            or1.Parameters.Add("WAKANZBA", OracleType.NVarChar).Value = dwData["WAKANZBA"].ToString();
            or1.Parameters.Add("WAKDIVISOR", OracleType.NVarChar).Value = dwData["WAKDIVISOR"].ToString();
            or1.Parameters.Add("WAKEAFAKTM", OracleType.NVarChar).Value = dwData["WAKEAFAKTM"].ToString();
            or1.Parameters.Add("WAKEAFAKTR", OracleType.NVarChar).Value = dwData["WAKEAFAKTR"].ToString();
            or1.Parameters.Add("WAKDISPOKZ", OracleType.NVarChar).Value = dwData["WAKDISPOKZ"].ToString();
            or1.Parameters.Add("WAKSTBR", OracleType.NVarChar).Value = dwData["WAKSTBR"].ToString();
            or1.Parameters.Add("WAKLLEIST", OracleType.NVarChar).Value = dwData["WAKLLEIST"].ToString();
            or1.Parameters.Add("WAKRLEIST", OracleType.NVarChar).Value = dwData["WAKRLEIST"].ToString();
            or1.Parameters.Add("WAKRBEM", OracleType.NVarChar).Value = dwData["WAKRBEM"].ToString();
            or1.Parameters.Add("WAKNET", OracleType.NVarChar).Value = dwData["WAKNET"].ToString();
            or1.Parameters.Add("WAKBRUT", OracleType.NVarChar).Value = dwData["WAKBRUT"].ToString();
            or1.Parameters.Add("WAKROSTA", OracleType.NVarChar).Value = dwData["WAKROSTA"].ToString();
            or1.Parameters.Add("WAKSBSTUE", OracleType.NVarChar).Value = dwData["WAKSBSTUE"].ToString();
            or1.Parameters.Add("WAKEARUE", OracleType.NVarChar).Value = dwData["WAKEARUE"].ToString();
            or1.Parameters.Add("WAKSTICH", OracleType.NVarChar).Value = dwData["WAKSTICH"].ToString();
            or1.Parameters.Add("WAKSCHIEART", OracleType.NVarChar).Value = dwData["WAKSCHIEART"].ToString();
            or1.Parameters.Add("WAKSCHIENE", OracleType.NVarChar).Value = dwData["WAKSCHIENE"].ToString();
            or1.Parameters.Add("WAKLAENG", OracleType.NVarChar).Value = dwData["WAKLAENG"].ToString();
            or1.Parameters.Add("WAKEINL", OracleType.NVarChar).Value = dwData["WAKEINL"].ToString();
            or1.Parameters.Add("WAKSPANNV", OracleType.NVarChar).Value = dwData["WAKSPANNV"].ToString();
            or1.Parameters.Add("WAKSPANNB", OracleType.NVarChar).Value = dwData["WAKSPANNB"].ToString();
            or1.Parameters.Add("WAKSPANNF", OracleType.NVarChar).Value = dwData["WAKSPANNF"].ToString();
            or1.Parameters.Add("WAKVERSATZ", OracleType.NVarChar).Value = dwData["WAKVERSATZ"].ToString();
            or1.Parameters.Add("WAKVARKZ", OracleType.NVarChar).Value = dwData["WAKVARKZ"].ToString();
            or1.Parameters.Add("WAKABFFDZ", OracleType.NVarChar).Value = dwData["WAKABFFDZ"].ToString();
            or1.Parameters.Add("WAKUSEDFDZ", OracleType.NVarChar).Value = dwData["WAKUSEDFDZ"].ToString();
            or1.Parameters.Add("WAKFILLER", OracleType.NVarChar).Value = dwData["WAKFILLER"].ToString();
            or1.Parameters.Add("WAKAENZL", OracleType.NVarChar).Value = dwData["WAKAENZL"].ToString();
            or1.Parameters.Add("WAKAENB", OracleType.NVarChar).Value = dwData["WAKAENB"].ToString();
            or1.Parameters.Add("WAKAEND", OracleType.NVarChar).Value = dwData["WAKAEND"].ToString();
            or1.Parameters.Add("WAKNEUB", OracleType.NVarChar).Value = dwData["WAKNEUB"].ToString();
            or1.Parameters.Add("WAKNEUD", OracleType.NVarChar).Value = dwData["WAKNEUD"].ToString();
            Connect2Proxy(or1);

        }
        public void UWAK02(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE WASTKE SET WAKMANDANT=:WAKMANDANT:,WAKKUNDNR=:WAKKUNDNR:,WAKWERK=:WAKWERK:,WAKABT=:WAKABT:,WAKART=:WAKART:,WAKVAR=:WAKVAR:,WAKWCOL=:WAKWCOL:,WAKPOS=:WAKPOS:,WAKKART=:WAKKART:,WAKKVAR=:WAKKVAR:,WAKKFARBE=:WAKKFARBE:,WAKBAUMKZ=:WAKBAUMKZ:,WAKVERWEN=:WAKVERWEN:,WAKANZBA=:WAKANZBA:,WAKDIVISOR=:WAKDIVISOR:,WAKEAFAKTM=:WAKEAFAKTM:,WAKEAFAKTR=:WAKEAFAKTR:,WAKDISPOKZ=:WAKDISPOKZ:,WAKSTBR=:WAKSTBR:,WAKLLEIST=:WAKLLEIST:,WAKRLEIST=:WAKRLEIST:,WAKRBEM=:WAKRBEM:,WAKNET=:WAKNET:,WAKBRUT=:WAKBRUT:,WAKROSTA=:WAKROSTA:,WAKSBSTUE=:WAKSBSTUE:,WAKEARUE=:WAKEARUE:,WAKSTICH=:WAKSTICH:,WAKSCHIEART=:WAKSCHIEART:,WAKSCHIENE=:WAKSCHIENE:,WAKLAENG=:WAKLAENG:,WAKEINL=:WAKEINL:,WAKSPANNV=:WAKSPANNV:,WAKSPANNB=:WAKSPANNB:,WAKSPANNF=:WAKSPANNF:,WAKVERSATZ=:WAKVERSATZ:,WAKVARKZ=:WAKVARKZ:,WAKABFFDZ=:WAKABFFDZ:,WAKUSEDFDZ=:WAKUSEDFDZ:,WAKFILLER=:WAKFILLER:,WAKAENZL=:WAKAENZL:,WAKAENB=:WAKAENB:,WAKAEND=:WAKAEND:,WAKNEUB=:WAKNEUB:,WAKNEUD=:WAKNEUD:"
                 + " WHERE    WAKMANDANT=:WAKMANDANT: AND WAKART=:WAKART  AND WAKVAR=:WAKVAR:  AND WAKWCOL=:WAKWCOL: AND WAKPOS=:WAKPOS:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
    }
}
